home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / marionettemadness.swf / scripts / __Packages / com / mosesSupposes / fuse / ZManager.as < prev   
Text File  |  2007-10-01  |  40KB  |  1,065 lines

  1. class com.mosesSupposes.fuse.ZManager
  2. {
  3.    var numTweens = 0;
  4.    function ZManager()
  5.    {
  6.       this.tweens = {};
  7.       this.numTweens = 0;
  8.    }
  9.    function addTween(obj, props, endvals, seconds, ease, delay, callback)
  10.    {
  11.       var _loc24_ = callback.skipLevel != undefined ? callback.skipLevel : 0;
  12.       var _loc44_ = callback.cycles != undefined ? callback.cycles : 1;
  13.       var _loc30_ = callback.extra1;
  14.       var _loc29_ = callback.extra2;
  15.       var _loc23_ = [];
  16.       var _loc14_ = _global.com.mosesSupposes.fuse.FuseFMP;
  17.       var _loc43_ = String("|" + _loc14_.getAllShortcuts().join("|") + "|");
  18.       var _loc42_ = com.mosesSupposes.fuse.FuseKitCommon._cts();
  19.       var _loc25_ = "";
  20.       var _loc28_ = "";
  21.       var _loc22_ = obj.__zigoID__;
  22.       var _loc7_ = this.tweens[String(_loc22_)];
  23.       if(_loc7_ != undefined && com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)
  24.       {
  25.          if(obj._listeners.length > 0)
  26.          {
  27.             for(var _loc40_ in _loc7_.props)
  28.             {
  29.                _loc23_.unshift(_loc40_);
  30.             }
  31.          }
  32.          _loc7_.numProps = 0;
  33.          this.cleanUp(true);
  34.       }
  35.       for(var _loc47_ in props)
  36.       {
  37.          var _loc5_ = props[_loc47_];
  38.          var _loc4_ = endvals[_loc47_];
  39.          var _loc15_ = 0;
  40.          if(_loc5_ == "_fade")
  41.          {
  42.             _loc5_ = "_alpha";
  43.             _loc15_ = _loc4_ >= 50 ? 1 : -1;
  44.          }
  45.          var _loc16_ = _loc42_.indexOf("|" + _loc5_ + "|") > -1;
  46.          var _loc18_ = _loc7_.colorProp;
  47.          if(_loc7_ != undefined)
  48.          {
  49.             if(_loc16_ == true && _loc18_ != undefined)
  50.             {
  51.                _loc23_.unshift(_loc18_);
  52.                delete _loc7_.props[_loc18_];
  53.                delete _loc7_.colorProp;
  54.                _loc7_.numProps = _loc7_.numProps - 1;
  55.             }
  56.             else if(_loc7_.props[_loc5_] != undefined)
  57.             {
  58.                _loc23_.unshift(_loc5_);
  59.                delete _loc7_[_loc5_];
  60.                _loc7_.numProps = _loc7_.numProps - 1;
  61.             }
  62.          }
  63.          var _loc3_ = {c:-1,fmp:-1,complex:-1};
  64.          var _loc11_ = _loc24_ == 0 && seconds + delay == 0 || _loc24_ > 0 && seconds == 0;
  65.          var _loc10_ = false;
  66.          var _loc13_ = _loc14_ != undefined && _loc43_.indexOf("|" + _loc5_ + "|") > -1;
  67.          var _loc19_ = _loc5_.toLowerCase().indexOf("colors") > -1 && _loc4_ instanceof Array;
  68.          var _loc27_ = _loc13_ == true && _loc5_.indexOf("lor") > -1 && _loc5_.charAt(2) != "l";
  69.          if(_loc13_ == true)
  70.          {
  71.             _loc3_.fmp = _loc14_;
  72.             _loc3_.ps = _loc14_.getFilterProp(obj,_loc5_,true);
  73.             _loc3_.special = true;
  74.          }
  75.          if(_loc16_ == true || _loc19_ == true || _loc27_ && _loc11_ == false)
  76.          {
  77.             _loc3_.complex = 1;
  78.             if(_loc16_ == true)
  79.             {
  80.                _loc3_.c = new Color(obj);
  81.                _loc3_.ps = Color(_loc3_.c).getTransform();
  82.                var _loc17_ = !(_loc5_ == "_tint" || _loc5_ == "_tintPercent" || _loc5_ == "_colorReset") ? _loc5_.slice(1) : "tint";
  83.                var _loc9_ = null;
  84.                var _loc12_ = null;
  85.                if(_loc5_ != "_colorTransform")
  86.                {
  87.                   if(_loc17_ == "tint")
  88.                   {
  89.                      if(typeof _loc4_ == "object")
  90.                      {
  91.                         _loc12_ = _loc4_.tint;
  92.                         _loc9_ = _global.isNaN(_loc4_.percent) != true ? _loc4_.percent : 100;
  93.                      }
  94.                      else if(_loc5_ == "_tintPercent" || _loc5_ == "_colorReset")
  95.                      {
  96.                         var _loc20_ = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
  97.                         if(_loc5_ == "_colorReset")
  98.                         {
  99.                            _loc9_ = Math.min(_loc20_,100 - Math.abs(Number(_loc4_)));
  100.                         }
  101.                         else
  102.                         {
  103.                            _loc9_ = typeof _loc4_ != "string" ? Number(_loc4_) : (_loc20_ || 0) + Number(_loc4_);
  104.                         }
  105.                         _loc9_ = Math.max(0,Math.min(_loc9_,100));
  106.                         _loc12_ = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
  107.                      }
  108.                      else
  109.                      {
  110.                         _loc12_ = _loc4_;
  111.                         _loc9_ = 100;
  112.                      }
  113.                   }
  114.                   else
  115.                   {
  116.                      _loc9_ = typeof _loc4_ != "string" ? _loc4_ : (com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_loc17_] || 0) + Number(_loc4_);
  117.                   }
  118.                   _loc4_ = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_loc17_,_loc9_,_loc12_);
  119.                }
  120.                if(_loc11_ == true)
  121.                {
  122.                   if(_loc5_ == "_colorTransform")
  123.                   {
  124.                      Color(_loc3_.c).setTransform(_loc4_);
  125.                   }
  126.                   else
  127.                   {
  128.                      com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj,_loc17_,_loc9_,_loc12_);
  129.                   }
  130.                }
  131.                else
  132.                {
  133.                   var _loc21_ = this.getChangeObj(_loc3_.ps,_loc4_,false,false);
  134.                   _loc3_.ch = _loc21_.map;
  135.                   if(_loc21_.changed == true)
  136.                   {
  137.                      _loc10_ = true;
  138.                   }
  139.                }
  140.             }
  141.             else if(_loc11_ == true)
  142.             {
  143.                _loc14_.setFilterProp(obj,_loc5_,_loc4_);
  144.             }
  145.             else if(_loc19_ == true)
  146.             {
  147.                _loc3_.c = 2;
  148.                _loc3_.ch = [];
  149.                for(_loc40_ in _loc4_)
  150.                {
  151.                   if(_loc4_[_loc40_] != null)
  152.                   {
  153.                      if(_loc3_.ps == null)
  154.                      {
  155.                         _loc3_.ps = [];
  156.                      }
  157.                      _loc3_.ps[_loc40_] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc3_.ps[_loc40_] != null ? _loc3_.ps[_loc40_] : obj[_loc5_][_loc40_]);
  158.                      _loc21_ = this.getChangeObj(_loc3_.ps[_loc40_],com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc4_[_loc40_]),true,false);
  159.                      _loc3_.ch[_loc40_] = _loc21_.map;
  160.                      if(_loc21_.changed == true)
  161.                      {
  162.                         _loc10_ = true;
  163.                      }
  164.                   }
  165.                }
  166.             }
  167.             else
  168.             {
  169.                _loc3_.c = 1;
  170.                _loc3_.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc3_.ps);
  171.                _loc21_ = this.getChangeObj(_loc3_.ps,com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc4_),true,false);
  172.                _loc3_.ch = _loc21_.map;
  173.                if(_loc21_.changed == true)
  174.                {
  175.                   _loc10_ = true;
  176.                }
  177.             }
  178.          }
  179.          else if(_loc5_ == "_bezier_")
  180.          {
  181.             this.removeTween(obj,"_x,_y",true);
  182.             if(_loc11_ == true)
  183.             {
  184.                if(_loc4_.x != null && _global.isNaN(Number(_loc4_.x)) == false)
  185.                {
  186.                   obj._x = typeof _loc4_.x != "string" ? _loc4_.x : obj._x + Number(_loc4_.x);
  187.                }
  188.                if(_loc4_.y != null && _global.isNaN(Number(_loc4_.y)) == false)
  189.                {
  190.                   obj._y = typeof _loc4_.y != "string" ? _loc4_.y : obj._y + Number(_loc4_.y);
  191.                }
  192.             }
  193.             else
  194.             {
  195.                _loc3_.special = true;
  196.                _loc3_.ps = 0;
  197.                _loc3_.ch = 1;
  198.                _loc3_.bz = {sx:obj._x,sy:obj._y};
  199.                if(_loc4_.x == null || _global.isNaN(Number(_loc4_.x)))
  200.                {
  201.                   _loc4_.x = _loc3_.bz.sx;
  202.                }
  203.                if(_loc4_.y == null || _global.isNaN(Number(_loc4_.y)))
  204.                {
  205.                   _loc4_.y = _loc3_.bz.sy;
  206.                }
  207.                _loc3_.bz.chx = typeof _loc4_.x != "string" ? _loc4_.x - _loc3_.bz.sx : Number(_loc4_.x);
  208.                if(_global.isNaN(_loc3_.bz.chx) == true)
  209.                {
  210.                   _loc3_.bx.chx = 0;
  211.                }
  212.                _loc3_.bz.chy = typeof _loc4_.y != "string" ? _loc4_.y - _loc3_.bz.sy : Number(_loc4_.y);
  213.                if(_global.isNaN(_loc3_.bz.chy) == true)
  214.                {
  215.                   _loc3_.bx.chy = 0;
  216.                }
  217.                if(_loc4_.controlX == null || _global.isNaN(Number(_loc4_.controlX)))
  218.                {
  219.                   _loc3_.bz.ctrlx = _loc3_.bz.sx + _loc3_.bz.chx / 2;
  220.                }
  221.                else
  222.                {
  223.                   _loc3_.bz.ctrlx = typeof _loc4_.controlX != "string" ? _loc4_.controlX : _loc3_.bz.sx + Number(_loc4_.controlX);
  224.                }
  225.                if(_loc4_.controlY == null || _global.isNaN(Number(_loc4_.controlY)))
  226.                {
  227.                   _loc3_.bz.ctrly = _loc3_.bz.sy + _loc3_.bz.chy / 2;
  228.                }
  229.                else
  230.                {
  231.                   _loc3_.bz.ctrly = typeof _loc4_.controlY != "string" ? _loc4_.controlY : _loc3_.bz.sy + Number(_loc4_.controlY);
  232.                }
  233.                _loc3_.bz.ctrlx -= _loc3_.bz.sx;
  234.                _loc3_.bz.ctrly -= _loc3_.bz.sy;
  235.                _loc10_ = _loc3_.bz.chx + _loc3_.bz.chy != 0;
  236.             }
  237.          }
  238.          else
  239.          {
  240.             if(typeof _loc4_ == "object")
  241.             {
  242.                _loc3_.complex = !(_loc4_ instanceof Array) ? 1 : 0;
  243.             }
  244.             if(_loc5_ == "_x" || _loc5_ == "_y")
  245.             {
  246.                this.removeTween(obj,"_bezier_",true);
  247.             }
  248.             if(_loc5_ == "_frame" && typeof obj == "movieclip")
  249.             {
  250.                _loc3_.ps = obj._currentframe;
  251.                _loc3_.special = true;
  252.             }
  253.             else if(_loc13_ == false)
  254.             {
  255.                if(_loc3_.complex > -1)
  256.                {
  257.                   _loc3_.ps = _loc3_.complex != 0 ? {} : [];
  258.                   for(_loc40_ in _loc4_)
  259.                   {
  260.                      _loc3_.ps[_loc40_] = obj[_loc5_][_loc40_];
  261.                   }
  262.                }
  263.                else
  264.                {
  265.                   _loc3_.ps = obj[_loc5_];
  266.                }
  267.             }
  268.             if(_loc11_ == true)
  269.             {
  270.                if(_loc13_ == true)
  271.                {
  272.                   _loc14_.setFilterProp(obj,_loc5_,typeof _loc4_ != "string" ? _loc4_ : _loc3_.ps + Number(_loc4_));
  273.                }
  274.                else if(_loc3_.complex > -1)
  275.                {
  276.                   for(_loc40_ in _loc4_)
  277.                   {
  278.                      if(_loc4_[_loc40_] != null && _global.isNaN(Number(_loc4_[_loc40_])) == false)
  279.                      {
  280.                         obj[_loc5_][_loc40_] = typeof _loc4_[_loc40_] != "string" ? _loc4_[_loc40_] : _loc3_.ps[_loc40_] + Number(_loc4_[_loc40_]);
  281.                         if(_global.isNaN(obj[_loc5_][_loc40_]) == true)
  282.                         {
  283.                            obj[_loc5_][_loc40_] = 0;
  284.                         }
  285.                      }
  286.                   }
  287.                }
  288.                else
  289.                {
  290.                   obj[_loc5_] = typeof _loc4_ != "string" ? _loc4_ : _loc3_.ps + Number(_loc4_);
  291.                   if(_loc15_ == 1)
  292.                   {
  293.                      obj._visible = true;
  294.                   }
  295.                   else if(_loc15_ == -1)
  296.                   {
  297.                      obj._visible = false;
  298.                   }
  299.                }
  300.             }
  301.             else if(_loc3_.complex > -1)
  302.             {
  303.                _loc21_ = this.getChangeObj(_loc3_.ps,_loc4_,_loc13_,_loc3_.complex == 0);
  304.                _loc3_.ch = _loc21_.map;
  305.                if(_loc21_.changed == true)
  306.                {
  307.                   _loc10_ = true;
  308.                }
  309.             }
  310.             else
  311.             {
  312.                if(_loc4_ == null || _global.isNaN(Number(_loc4_)))
  313.                {
  314.                   _loc4_ = _loc3_.ps;
  315.                }
  316.                _loc3_.ch = typeof _loc4_ != "string" ? Number(_loc4_) - _loc3_.ps : Number(_loc4_);
  317.                if(_global.isNaN(_loc3_.ch) == true)
  318.                {
  319.                   _loc3_.ch = 0;
  320.                }
  321.                _loc10_ = _loc3_.ch != 0;
  322.             }
  323.          }
  324.          if(_loc24_ == 0 && (_loc10_ == true || _loc11_ == false) || _loc10_ == true && _loc11_ == false)
  325.          {
  326.             if(_loc3_.complex > -1 && _loc3_.c !== 2)
  327.             {
  328.                _loc3_.ps = [_loc3_.ps];
  329.                _loc3_.ch = [_loc3_.ch];
  330.             }
  331.             _loc3_.ts = this.now + delay * 1000;
  332.             _loc3_.pt = -1;
  333.             _loc3_.d = seconds * 1000;
  334.             _loc3_.ef = ease;
  335.             _loc3_.sf = false;
  336.             _loc3_.cycles = _loc44_;
  337.             if(_loc30_ != undefined)
  338.             {
  339.                _loc3_.e1 = _loc30_;
  340.             }
  341.             if(_loc29_ != undefined)
  342.             {
  343.                _loc3_.e2 = _loc29_;
  344.             }
  345.             _loc3_.v = _loc15_;
  346.             if(callback.start != undefined)
  347.             {
  348.                _loc3_.scb = callback.start;
  349.             }
  350.             if(callback.upd != undefined)
  351.             {
  352.                _loc3_.ucb = callback.upd;
  353.             }
  354.             if(callback.end != undefined)
  355.             {
  356.                _loc3_.ecb = callback.end;
  357.             }
  358.             if(callback.roundResults != undefined)
  359.             {
  360.                _loc3_.rr = callback.roundResults;
  361.             }
  362.             if(this.tweens[String(_loc22_)] == undefined)
  363.             {
  364.                var _loc0_ = null;
  365.                _loc7_ = this.tweens[String(_loc22_)] = {numProps:0,locked:false,targ:obj,targID:String("\"" + (obj._name == undefined ? obj.toString() : obj._name) + "\""),targZID:_loc22_,props:{}};
  366.                this.numTweens = this.numTweens + 1;
  367.             }
  368.             if(_loc16_ == true)
  369.             {
  370.                _loc7_.colorProp = _loc5_;
  371.             }
  372.             _loc7_.props[_loc5_] = _loc3_;
  373.             _loc7_.numProps = _loc7_.numProps + 1;
  374.             _loc25_ = _loc5_ + "," + _loc25_;
  375.             _loc28_ = (typeof _loc4_ != "string" ? _loc4_ : "\"" + _loc4_ + "\"") + "," + _loc28_;
  376.          }
  377.          _loc3_ = undefined;
  378.       }
  379.       if(_loc7_ == undefined || _loc7_.numProps <= 0)
  380.       {
  381.          this.cleanUp();
  382.       }
  383.       if(_loc23_.length > 0 && com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
  384.       {
  385.          com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:obj,props:_loc23_,__zigoID__:_loc22_,during:"add"});
  386.       }
  387.       if(_loc25_ == "")
  388.       {
  389.          if(_loc24_ == 2)
  390.          {
  391.             if(com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2)
  392.             {
  393.                com.mosesSupposes.fuse.FuseKitCommon.error("011",obj._name == undefined ? obj.toString() : obj._name,props.toString());
  394.             }
  395.          }
  396.          else
  397.          {
  398.             var _loc48_ = obj._listeners.length > 0;
  399.             if(_loc48_ == true)
  400.             {
  401.                obj.broadcastMessage("onTweenStart",{target:obj,props:props});
  402.             }
  403.             if(callback.start != undefined)
  404.             {
  405.                callback.start.f.apply(callback.start.s,callback.start.a);
  406.             }
  407.             if(_loc48_ == true)
  408.             {
  409.                obj.broadcastMessage("onTweenUpdate",{target:obj,props:props});
  410.             }
  411.             if(callback.upd != undefined)
  412.             {
  413.                callback.upd.f.apply(callback.upd.s,callback.upd.a);
  414.             }
  415.             if(_loc48_ == true)
  416.             {
  417.                obj.broadcastMessage("onTweenEnd",{target:obj,props:props});
  418.             }
  419.             if(callback.end != undefined)
  420.             {
  421.                callback.end.f.apply(callback.end.s,callback.end.a);
  422.             }
  423.          }
  424.          this.cleanUp();
  425.       }
  426.       if(com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2)
  427.       {
  428.          if(_loc25_ == "")
  429.          {
  430.             com.mosesSupposes.fuse.FuseKitCommon.error("012",obj._name == undefined ? obj.toString() : obj._name,props.toString(),endvals.toString());
  431.          }
  432.          else
  433.          {
  434.             com.mosesSupposes.fuse.FuseKitCommon.error("013",obj._name == undefined ? obj.toString() : obj._name,_loc25_.slice(0,-1),_loc28_.slice(0,-1));
  435.          }
  436.       }
  437.       return _loc25_ != "" ? _loc25_.slice(0,-1) : null;
  438.    }
  439.    function removeTween(targs, props, noInit)
  440.    {
  441.       var _loc4_ = {};
  442.       var _loc12_ = this.paramsObj(targs,props);
  443.       if(_loc12_.none == true)
  444.       {
  445.          return undefined;
  446.       }
  447.       var _loc16_ = _loc12_.all;
  448.       var _loc17_ = _loc12_.allprops;
  449.       var _loc9_ = _loc16_ != true ? Object(_loc12_.tg) : this.tweens;
  450.       var _loc8_ = false;
  451.       for(var _loc20_ in _loc9_)
  452.       {
  453.          var _loc3_ = _loc16_ != true ? String(_loc9_[_loc20_].__zigoID__) : _loc20_;
  454.          var _loc2_ = this.tweens[_loc3_];
  455.          var _loc6_ = _loc17_ != true ? _loc12_.props : _loc2_.props;
  456.          for(var _loc14_ in _loc6_)
  457.          {
  458.             var _loc5_ = _loc14_ == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR && _loc2_.colorProp != undefined;
  459.             if(_loc2_.props[_loc14_] != undefined || _loc5_ == true)
  460.             {
  461.                if(_loc4_[_loc3_] == null)
  462.                {
  463.                   _loc4_[_loc3_] = [];
  464.                }
  465.                _loc4_[_loc3_].unshift(_loc14_);
  466.                if(_loc14_ == _loc2_.colorProp || _loc5_ == true)
  467.                {
  468.                   delete _loc2_.props[_loc2_.colorProp];
  469.                   delete _loc2_.colorProp;
  470.                }
  471.                else
  472.                {
  473.                   delete _loc2_.props[_loc14_];
  474.                }
  475.                _loc2_.numProps = _loc2_.numProps - 1;
  476.                if(_loc2_.numProps <= 0)
  477.                {
  478.                   _loc8_ = true;
  479.                   break;
  480.                }
  481.             }
  482.          }
  483.       }
  484.       if(com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
  485.       {
  486.          for(var _loc19_ in _loc4_)
  487.          {
  488.             var _loc7_ = this.tweens[_loc19_].targ;
  489.             com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:(typeof _loc7_.addProperty != "function" ? "[MISSING(\"" + this.tweens[_loc19_].targID + "\")]" : _loc7_),props:_loc4_[_loc19_],__zigoID__:this.tweens[_loc19_].targZID,during:(noInit != true ? "remove" : "add")});
  490.          }
  491.       }
  492.       if(_loc8_ == true)
  493.       {
  494.          this.cleanUp(noInit);
  495.       }
  496.    }
  497.    function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo)
  498.    {
  499.       if(type == "lock")
  500.       {
  501.          this.tweens[String(targs.__zigoID__)].locked = props;
  502.          return undefined;
  503.       }
  504.       var _loc11_ = this.paramsObj(targs,props);
  505.       if(_loc11_.none == true)
  506.       {
  507.          return undefined;
  508.       }
  509.       var _loc14_ = _loc11_.all;
  510.       var _loc15_ = _loc11_.allprops;
  511.       var _loc9_ = _loc14_ != true ? Object(_loc11_.tg) : this.tweens;
  512.       var _loc8_ = 0;
  513.       for(var _loc16_ in _loc9_)
  514.       {
  515.          var _loc7_ = _loc14_ != true ? String(_loc9_[_loc16_].__zigoID__) : _loc16_;
  516.          var _loc5_ = this.tweens[_loc7_];
  517.          var _loc4_ = _loc15_ != true ? _loc11_.props : _loc5_.props;
  518.          if(_loc4_.ALLCOLOR == true)
  519.          {
  520.             _loc4_[_loc5_.colorProp] = true;
  521.             delete _loc4_.ALLCOLOR;
  522.          }
  523.          for(var _loc10_ in _loc4_)
  524.          {
  525.             _loc8_ = _loc8_ + 1;
  526.             var _loc2_ = _loc5_.props[_loc10_];
  527.             if(type == "rewind")
  528.             {
  529.                if(pauseFlag == true)
  530.                {
  531.                   _loc2_.pt = this.now;
  532.                }
  533.                _loc2_.ts = this.now;
  534.                if(noEvents != true)
  535.                {
  536.                   _loc2_.sf = false;
  537.                   if(_loc2_.scb != undefined)
  538.                   {
  539.                      _loc2_.scb.fired = false;
  540.                   }
  541.                }
  542.             }
  543.             else if(type == "ff")
  544.             {
  545.                if(noEvents == true)
  546.                {
  547.                   _loc2_.suppressEnd = true;
  548.                }
  549.                _loc2_.o = true;
  550.                _loc2_.pt = -1;
  551.                _loc2_.ts = this.now - _loc2_.d;
  552.             }
  553.             else if(type == "skipTo")
  554.             {
  555.                _loc2_.ts = Math.min(this.now,_loc2_.ts + (this.now - _loc2_.ts) - skipTo * 1000);
  556.             }
  557.             else if(type == "pause")
  558.             {
  559.                if(_loc2_.pt == -1)
  560.                {
  561.                   _loc2_.pt = this.now;
  562.                }
  563.             }
  564.             else if(type == "unpause")
  565.             {
  566.                if(_loc2_.pt != -1)
  567.                {
  568.                   _loc2_.ts = this.now - (_loc2_.pt - _loc2_.ts);
  569.                   _loc2_.pt = -1;
  570.                }
  571.             }
  572.          }
  573.       }
  574.       if(type == "ff" && _loc8_ > 0)
  575.       {
  576.          this.update();
  577.       }
  578.       else if(type == "rewind" && _loc8_ > 0)
  579.       {
  580.          this.update(true);
  581.       }
  582.    }
  583.    function getStatus(type, targ, param)
  584.    {
  585.       if(targ == null)
  586.       {
  587.          return null;
  588.       }
  589.       var _loc8_ = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
  590.       var _loc4_ = this.tweens[String(targ.__zigoID__)];
  591.       switch(type)
  592.       {
  593.          case "paused":
  594.             var _loc2_ = _loc4_.props;
  595.             if(param != null)
  596.             {
  597.                if(_loc2_[String(param)] == undefined)
  598.                {
  599.                   return false;
  600.                }
  601.                return Boolean(_loc2_[String(param)].pt != -1);
  602.             }
  603.             for(var _loc6_ in _loc2_)
  604.             {
  605.                if(_loc2_[_loc6_].pt != -1)
  606.                {
  607.                   return true;
  608.                }
  609.             }
  610.             return false;
  611.             break;
  612.          case "active":
  613.             if(param == null)
  614.             {
  615.                return Boolean(_loc4_ != undefined);
  616.             }
  617.             if(String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR)
  618.             {
  619.                return Boolean(_loc4_.colorProp != undefined);
  620.             }
  621.             return Boolean(_loc4_.props[String(param)] != undefined);
  622.             break;
  623.          case "count":
  624.             if(!_loc8_)
  625.             {
  626.                return _loc4_.numProps;
  627.             }
  628.             var _loc3_ = 0;
  629.             for(_loc6_ in this.tweens)
  630.             {
  631.                _loc3_ += this.tweens[_loc6_].numProps;
  632.             }
  633.             return _loc3_;
  634.             break;
  635.          case "locked":
  636.             return _loc4_.locked;
  637.          default:
  638.       }
  639.    }
  640.    function update(force)
  641.    {
  642.       var _loc19_ = {};
  643.       var _loc21_ = {};
  644.       var _loc20_ = {};
  645.       var _loc15_ = {};
  646.       var _loc13_ = {};
  647.       var _loc14_ = {};
  648.       var _loc24_ = false;
  649.       var _loc22_ = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
  650.       for(var _loc33_ in this.tweens)
  651.       {
  652.          var _loc12_ = this.tweens[_loc33_];
  653.          var _loc5_ = _loc12_.targ;
  654.          var _loc32_ = _loc12_.props;
  655.          var _loc18_ = _loc5_._listeners.length > 0;
  656.          if(_loc5_.__zigoID__ == undefined)
  657.          {
  658.             _loc24_ = true;
  659.             if(com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
  660.             {
  661.                var _loc23_ = [];
  662.                for(var _loc28_ in _loc32_)
  663.                {
  664.                   _loc23_.unshift(_loc28_);
  665.                }
  666.                com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:(typeof _loc5_.addProperty != "function" ? "[MISSING:" + _loc12_.targID + "]" : _loc5_),props:_loc23_,__zigoID__:_loc12_.targZID,during:"update"});
  667.             }
  668.          }
  669.          else
  670.          {
  671.             for(_loc28_ in _loc32_)
  672.             {
  673.                var _loc3_ = _loc32_[_loc28_];
  674.                if(!((_loc3_.ts > this.now || _loc3_.pt != -1) && force != true))
  675.                {
  676.                   var _loc9_ = this.now >= _loc3_.ts + _loc3_.d;
  677.                   if(_loc3_.complex == -1)
  678.                   {
  679.                      var _loc6_ = undefined;
  680.                      if(_loc9_ == true)
  681.                      {
  682.                         _loc6_ = _loc3_.ps + _loc3_.ch;
  683.                         if(_loc3_.cycles > 1 || _loc3_.cycles == 0)
  684.                         {
  685.                            if(_loc3_.cycles > 1)
  686.                            {
  687.                               _loc3_.cycles = _loc3_.cycles - 1;
  688.                            }
  689.                            _loc3_.ps = _loc6_;
  690.                            _loc3_.ch = - _loc3_.ch;
  691.                            _loc3_.ts = this.now;
  692.                            _loc9_ = false;
  693.                         }
  694.                      }
  695.                      else
  696.                      {
  697.                         _loc6_ = _loc3_.ef(this.now - _loc3_.ts,_loc3_.ps,_loc3_.ch,_loc3_.d,_loc3_.e1,_loc3_.e2);
  698.                      }
  699.                      if(_global.isNaN(_loc6_) == false)
  700.                      {
  701.                         if(_loc3_.rr == true || _loc22_ == true && _loc3_.rr !== false)
  702.                         {
  703.                            _loc6_ = Math.round(Number(_loc6_));
  704.                         }
  705.                         if(_loc3_.special != true)
  706.                         {
  707.                            _loc5_[_loc28_] = _loc6_;
  708.                         }
  709.                         else if(_loc3_.fmp != -1)
  710.                         {
  711.                            _loc3_.fmp.setFilterProp(_loc5_,_loc28_,_loc6_);
  712.                         }
  713.                         else if(_loc28_ == "_bezier_")
  714.                         {
  715.                            var _loc10_ = _loc3_.bz;
  716.                            _loc5_._x = _loc10_.sx + _loc6_ * (2 * (1 - _loc6_) * _loc10_.ctrlx + _loc6_ * _loc10_.chx);
  717.                            _loc5_._y = _loc10_.sy + _loc6_ * (2 * (1 - _loc6_) * _loc10_.ctrly + _loc6_ * _loc10_.chy);
  718.                         }
  719.                         else if(_loc28_ == "_frame")
  720.                         {
  721.                            MovieClip(_loc5_).gotoAndStop(Math.ceil(_loc6_));
  722.                         }
  723.                      }
  724.                   }
  725.                   else
  726.                   {
  727.                      var _loc16_ = _loc9_ == true && (_loc3_.cycles > 1 || _loc3_.cycles == 0);
  728.                      var _loc7_ = [];
  729.                      for(var _loc25_ in _loc3_.ch)
  730.                      {
  731.                         var _loc4_ = _loc3_.complex != 0 ? {} : [];
  732.                         for(var _loc26_ in _loc3_.ch[_loc25_])
  733.                         {
  734.                            var _loc8_ = _loc3_.ch[_loc25_][_loc26_];
  735.                            var _loc11_ = _loc3_.ps[_loc25_][_loc26_];
  736.                            if(_loc9_ == true)
  737.                            {
  738.                               _loc4_[_loc26_] = _loc11_ + _loc8_;
  739.                               if(_loc16_ == true)
  740.                               {
  741.                                  _loc3_.ch[_loc25_][_loc26_] = - _loc8_;
  742.                               }
  743.                            }
  744.                            else
  745.                            {
  746.                               _loc4_[_loc26_] = _loc3_.ef(this.now - _loc3_.ts,_loc11_,_loc8_,_loc3_.d,_loc3_.e1,_loc3_.e2);
  747.                            }
  748.                            if(_global.isNaN(_loc4_[_loc26_]) == false)
  749.                            {
  750.                               if(_loc3_.rr == true || _loc22_ == true && _loc3_.rr !== false)
  751.                               {
  752.                                  _loc4_[_loc26_] = Math.round(_loc4_[_loc26_]);
  753.                               }
  754.                            }
  755.                            if(_loc3_.fmp == -1 && _loc3_.c == -1)
  756.                            {
  757.                               _loc5_[_loc28_][_loc26_] = _loc4_[_loc26_];
  758.                            }
  759.                         }
  760.                         _loc7_.push(_loc4_);
  761.                         if(_loc3_.fmp == -1 && _loc3_.c == 2)
  762.                         {
  763.                            _loc5_[_loc28_][_loc25_] = Number(_loc4_.rb << 16 | _loc4_.gb << 8 | _loc4_.bb);
  764.                         }
  765.                      }
  766.                      if(_loc3_.fmp != -1)
  767.                      {
  768.                         if(_loc3_.c == 1)
  769.                         {
  770.                            _loc3_.fmp.setFilterProp(_loc5_,_loc28_,_loc7_[0].rb << 16 | _loc7_[0].gb << 8 | _loc7_[0].bb);
  771.                         }
  772.                         else if(_loc3_.c == 2)
  773.                         {
  774.                            var _loc17_ = [];
  775.                            for(_loc26_ in _loc7_)
  776.                            {
  777.                               _loc17_.unshift(_loc7_[_loc26_].rb << 16 | _loc7_[_loc26_].gb << 8 | _loc7_[_loc26_].bb);
  778.                            }
  779.                            _loc3_.fmp.setFilterProp(_loc5_,_loc28_,_loc17_);
  780.                         }
  781.                      }
  782.                      else if(_loc3_.c != -1)
  783.                      {
  784.                         _loc3_.c.setTransform(_loc7_[0]);
  785.                      }
  786.                      if(_loc16_ == true)
  787.                      {
  788.                         if(_loc3_.cycles > 1)
  789.                         {
  790.                            _loc3_.cycles = _loc3_.cycles - 1;
  791.                         }
  792.                         _loc9_ = false;
  793.                         _loc3_.ts = this.now;
  794.                         _loc3_.ps = _loc7_;
  795.                      }
  796.                   }
  797.                   if(_loc3_.sf == false)
  798.                   {
  799.                      if(_loc3_.v != null)
  800.                      {
  801.                         _loc5_._visible = true;
  802.                      }
  803.                      if(_loc18_ == true)
  804.                      {
  805.                         if(_loc15_[_loc33_] == undefined)
  806.                         {
  807.                            _loc15_[_loc33_] = [_loc5_,[]];
  808.                         }
  809.                         _loc15_[_loc33_][1].unshift(_loc28_);
  810.                      }
  811.                      _loc3_.sf = true;
  812.                   }
  813.                   if(_loc3_.scb.fired == false)
  814.                   {
  815.                      _loc19_[String(_loc3_.scb.id)] = _loc3_.scb;
  816.                      _loc3_.scb.fired = true;
  817.                   }
  818.                   if(_loc18_ == true)
  819.                   {
  820.                      if(_loc13_[_loc33_] == undefined)
  821.                      {
  822.                         _loc13_[_loc33_] = [_loc5_,[]];
  823.                      }
  824.                      _loc13_[_loc33_][1].unshift(_loc28_);
  825.                   }
  826.                   if(_loc3_.ucb != undefined)
  827.                   {
  828.                      _loc21_[String(_loc3_.ucb.id)] = _loc3_.ucb;
  829.                   }
  830.                   if(_loc9_ == true)
  831.                   {
  832.                      if(_loc3_.v === -1)
  833.                      {
  834.                         _loc5_._visible = false;
  835.                      }
  836.                      if(_loc3_.suppressEnd != true)
  837.                      {
  838.                         if(_loc18_ == true)
  839.                         {
  840.                            if(_loc14_[_loc33_] == undefined)
  841.                            {
  842.                               _loc14_[_loc33_] = [_loc5_,[]];
  843.                            }
  844.                            _loc14_[_loc33_][1].unshift(_loc28_);
  845.                         }
  846.                         if(_loc3_.ecb != undefined)
  847.                         {
  848.                            _loc20_[String(_loc3_.ecb.id)] = _loc3_.ecb;
  849.                         }
  850.                      }
  851.                      delete _loc32_[_loc28_];
  852.                      if(_loc28_ == _loc12_.colorProp)
  853.                      {
  854.                         delete _loc12_.colorProp;
  855.                      }
  856.                      _loc12_.numProps = _loc12_.numProps - 1;
  857.                      if(_loc12_.numProps <= 0)
  858.                      {
  859.                         _loc24_ = true;
  860.                      }
  861.                   }
  862.                   delete _loc3_.suppressEnd;
  863.                }
  864.             }
  865.          }
  866.       }
  867.       for(_loc33_ in _loc15_)
  868.       {
  869.          _loc15_[_loc33_][0].broadcastMessage("onTweenStart",{target:_loc15_[_loc33_][0],props:_loc15_[_loc33_][1]});
  870.       }
  871.       for(_loc33_ in _loc19_)
  872.       {
  873.          _loc19_[_loc33_].f.apply(_loc19_[_loc33_].s,_loc19_[_loc33_].a);
  874.       }
  875.       for(_loc33_ in _loc13_)
  876.       {
  877.          _loc13_[_loc33_][0].broadcastMessage("onTweenUpdate",{target:_loc13_[_loc33_][0],props:_loc13_[_loc33_][1]});
  878.       }
  879.       for(_loc33_ in _loc21_)
  880.       {
  881.          _loc21_[_loc33_].f.apply(_loc21_[_loc33_].s,_loc21_[_loc33_].a);
  882.       }
  883.       for(_loc33_ in _loc14_)
  884.       {
  885.          _loc14_[_loc33_][0].broadcastMessage("onTweenEnd",{target:_loc14_[_loc33_][0],props:_loc14_[_loc33_][1]});
  886.       }
  887.       for(_loc33_ in _loc20_)
  888.       {
  889.          _loc20_[_loc33_].f.apply(_loc20_[_loc33_].s,_loc20_[_loc33_].a);
  890.       }
  891.       if(_loc24_)
  892.       {
  893.          this.cleanUp();
  894.       }
  895.       this.now = getTimer();
  896.    }
  897.    function cleanUp(noInit)
  898.    {
  899.       for(var _loc4_ in this.tweens)
  900.       {
  901.          var _loc2_ = this.tweens[_loc4_].targ;
  902.          if(this.tweens[_loc4_].numProps <= 0 || _loc2_.__zigoID__ == undefined)
  903.          {
  904.             if(_loc2_ != undefined && _loc2_.tween == undefined && noInit != true && _loc2_._listeners.length <= 0)
  905.             {
  906.                com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_loc2_);
  907.             }
  908.             delete this.tweens[_loc4_];
  909.             this.numTweens = this.numTweens - 1;
  910.          }
  911.       }
  912.       if(this.numTweens <= 0)
  913.       {
  914.          this.numTweens = 0;
  915.          delete this.tweens;
  916.          this.tweens = {};
  917.          if(noInit != true)
  918.          {
  919.             com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this,"setup",[true]);
  920.          }
  921.       }
  922.    }
  923.    function paramsObj(targs, props, endvals)
  924.    {
  925.       var _loc6_ = {};
  926.       _loc6_.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
  927.       _loc6_.none = Boolean(targs == null);
  928.       if(_loc6_.all == true)
  929.       {
  930.          _loc6_.tg = [null];
  931.       }
  932.       else
  933.       {
  934.          _loc6_.tg = !(targs instanceof Array) ? [targs] : targs;
  935.          for(var _loc11_ in _loc6_.tg)
  936.          {
  937.             var _loc7_ = _loc6_.tg[_loc11_];
  938.             if(_loc7_ == null || !(typeof _loc7_ == "object" || typeof _loc7_ == "movieclip"))
  939.             {
  940.                _loc6_.tg.splice(Number(_loc11_),1);
  941.             }
  942.          }
  943.       }
  944.       _loc6_.allprops = props == null;
  945.       var _loc1_ = undefined;
  946.       var _loc4_ = undefined;
  947.       var _loc3_ = {};
  948.       if(_loc6_.allprops == false)
  949.       {
  950.          if(typeof props == "string" && (String(props).indexOf(" ") > -1 || String(props).indexOf(",") > -1))
  951.          {
  952.             props = String(props.split(" ").join("")).split(",");
  953.          }
  954.          _loc1_ = !(props instanceof Array) ? [props] : props.slice();
  955.          if(endvals != undefined)
  956.          {
  957.             if(typeof endvals == "string" && (String(endvals).indexOf(" ") > -1 || String(endvals).indexOf(",") > -1))
  958.             {
  959.                endvals = String(endvals.split(" ").join("")).split(",");
  960.             }
  961.             _loc4_ = !(endvals instanceof Array) ? [endvals] : endvals.slice();
  962.             while(_loc4_.length < _loc1_.length)
  963.             {
  964.                _loc4_.push(_loc4_[_loc4_.length - 1]);
  965.             }
  966.             _loc4_.splice(_loc1_.length,_loc4_.length - _loc1_.length);
  967.          }
  968.          for(_loc11_ in _loc1_)
  969.          {
  970.             var _loc2_ = Number(_loc11_);
  971.             if(_loc1_[_loc11_] != "_scale" && _loc1_[_loc11_] != "_size")
  972.             {
  973.                if(_loc3_[_loc1_[_loc11_]] == undefined)
  974.                {
  975.                   if(_loc1_[_loc11_] == "_fade")
  976.                   {
  977.                      _loc1_[_loc11_] = "_alpha";
  978.                   }
  979.                   if(String(_loc1_[_loc11_]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR)
  980.                   {
  981.                      _loc1_[_loc11_] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
  982.                   }
  983.                   _loc3_[_loc1_[_loc11_]] = true;
  984.                }
  985.                else
  986.                {
  987.                   _loc1_.splice(_loc2_,1);
  988.                   _loc4_.splice(_loc2_,1);
  989.                }
  990.             }
  991.             else
  992.             {
  993.                var _loc8_ = String(_loc1_.splice(_loc2_,1)[0]);
  994.                var _loc5_ = _loc4_.splice(_loc2_,1)[0];
  995.                if(_loc8_ == "_scale")
  996.                {
  997.                   if(_loc3_._xscale == undefined)
  998.                   {
  999.                      _loc1_.splice(_loc2_,0,"_xscale");
  1000.                      _loc4_.splice(_loc2_,0,_loc5_);
  1001.                      _loc3_._xscale = true;
  1002.                      _loc2_ = _loc2_ + 1;
  1003.                   }
  1004.                   if(_loc3_._yscale == undefined)
  1005.                   {
  1006.                      _loc1_.splice(_loc2_,0,"_yscale");
  1007.                      _loc4_.splice(_loc2_,0,_loc5_);
  1008.                      _loc3_._yscale = true;
  1009.                   }
  1010.                }
  1011.                if(_loc8_ == "_size")
  1012.                {
  1013.                   if(_loc3_._width == undefined)
  1014.                   {
  1015.                      _loc1_.splice(_loc2_,0,"_width");
  1016.                      _loc4_.splice(_loc2_,0,_loc5_);
  1017.                      _loc3_._width = true;
  1018.                      _loc2_ = _loc2_ + 1;
  1019.                   }
  1020.                   if(_loc3_._yscale == undefined)
  1021.                   {
  1022.                      _loc1_.splice(_loc2_,0,"_height");
  1023.                      _loc4_.splice(_loc2_,0,_loc5_);
  1024.                      _loc3_._height = true;
  1025.                   }
  1026.                }
  1027.             }
  1028.          }
  1029.          for(_loc11_ in _loc1_)
  1030.          {
  1031.             if(_loc1_[_loc11_] == "_xscale" && _loc3_._width == true || _loc1_[_loc11_] == "_yscale" && _loc3_._height == true)
  1032.             {
  1033.                _loc1_.splice(Number(_loc11_),1);
  1034.                _loc4_.splice(Number(_loc11_),1);
  1035.                delete _loc3_[_loc1_[_loc11_]];
  1036.             }
  1037.          }
  1038.       }
  1039.       _loc6_.pa = _loc1_;
  1040.       _loc6_.va = _loc4_;
  1041.       _loc6_.props = _loc3_;
  1042.       return _loc6_;
  1043.    }
  1044.    function getChangeObj(ps, ep, isFMP, useArray)
  1045.    {
  1046.       var _loc3_ = {map:(useArray != true ? {} : []),changed:false};
  1047.       for(var _loc7_ in ep)
  1048.       {
  1049.          if((isFMP == true && _loc7_.charAt(1) == "b" || ep[_loc7_] != ps[_loc7_] || useArray == true) && ep[_loc7_] != null && _global.isNaN(Number(ep[_loc7_])) == false)
  1050.          {
  1051.             _loc3_.map[_loc7_] = typeof ep[_loc7_] != "string" ? ep[_loc7_] - ps[_loc7_] : Number(ep[_loc7_]);
  1052.             if(_global.isNaN(_loc3_.map[_loc7_]) == true)
  1053.             {
  1054.                _loc3_.map[_loc7_] = 0;
  1055.             }
  1056.             else if(_loc3_.map[_loc7_] != 0)
  1057.             {
  1058.                _loc3_.changed = true;
  1059.             }
  1060.          }
  1061.       }
  1062.       return _loc3_;
  1063.    }
  1064. }
  1065.